#ifndef _ONION_PUT_HANDLER_H_
#define _ONION_PUT_HANDLER_H_

#include <stddef.h>

#ifdef __cplusplus
extern "C"{
#endif

struct onion_put_sink {
  int (*write)(void* priv, const void* buf, size_t n);
  int (*close)(void* priv);
  const char* (*name)(void* priv);
  void *priv;
};
typedef struct onion_put_sink onion_put_sink_t;

struct onion_put_sink_pool {
  onion_put_sink_t* (*alloc_sink)(void* priv, size_t size);
  void (*free_sink)(void* priv, onion_put_sink_t* sink);
  void *priv;
};

typedef struct onion_put_sink_pool onion_put_sink_pool_t;

#ifdef __cplusplus
}
#endif

#endif // _ONION_PUT_HANDLER_H_
